Page({
  data: {
    announcement: [],
  },
  async onLoad() {
    const { code, data } = await wx.http.get('/announcement')
    if (code === 10000) {
      this.setData({
        announcement: data,
      })
    }
  },

  getInformation(e) {
    const id = e.currentTarget.dataset.id
    wx.navigateTo({
      url: `/pages/notify/index?id=${id}`,
    })
  },
})
